<?php include "../public/header.php";?>
<?php include "../public/header_edit.php";?>
<body>
<form class="layui-form layui-form-pane" id="operatePage">
    <div class="page-title">
        <div class="page-title-con">
            <span>案件移交</span>
            <div class="move_title"></div>
            <?php include "../public/sub.php";?>
        </div>
    </div>

    <div class="main-container">
        <div class="layui-form-item">
            <div class="layui-row layui-col-space10">
                <div class="layui-col-md12">
                    <label class="layui-form-label">移交人</label>
                    <div class="layui-input-block">
                        <input type="text" name="jiao_yi" id="jiao_yi" placeholder="请输入" clearable autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row layui-col-space10">
                <div class="layui-col-md12">
                    <label class="layui-form-label">接收人</label>
                    <div class="layui-input-block">
                        <input type="text" name="jiao_jie" id="jiao_jie" placeholder="请输入" clearable autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-row layui-col-space10">
                <div class="layui-col-md12">
                    <label class="layui-form-label"><text>*</text>交接时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="jiao_dt" id="jiao_dt" readonly placeholder="请选择" clearable  autocomplete="off" class="layui-input bdate_ymd">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item height_auto">
            <div class="layui-row layui-col-space10">
                <div class="layui-col-md12">
                    <label class="layui-form-label label_textarea">移交说明</label>
                    <div class="layui-input-block">
                        <textarea id="jiao_shuo" name="jiao_shuo" placeholder="请输入" class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<script>
    var param_ids = getQueryVariable('id') || '';
    $("#operatePage").validate({
        rules: {
            jiao_dt: {required: true},
        },
        messages:{
            jiao_dt: {required: "请选择"},
        }
    });

    layui.use(['laytp', 'form'], function() {
        var form = layui.form, layer = layui.layer;
        render_input_attr();


        form.on('submit(add)', function(data){
            var validRes = $("#operatePage").valid();
            if(!validRes){return false;}

            data.field.ids = param_ids;
            facade.ajax({url: ask_legal_jiao, data:data.field}).done(function(res){
                if (res.code === 2000) {
                    dataPostTimeOut();
                }
            });

            return false;
        });

    });

</script>
</body>
</html>
